{% extends 'base.html' %}
{% block content %}
<h2>我的地址</h2>
<a href="/address/create/" class="btn btn-primary">新增地址</a>
<table class="table">
    <thead>
        <tr>
            <th>收件人</th>
            <th>手机号</th>
            <th>地址详情</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for addr in addresses %}
        <tr>
            <td>{{ addr.receiver }}</td>
            <td>{{ addr.phone }}</td>
            <td>{{ addr.address }}</td>
            <td>{{ addr.remark }}</td>
            <td><a href="/address/delete/{{ addr.id }}/" class="btn btn-danger btn-sm">删除</a></td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
